Skip to content

Conversation

philasmar
Copy link
Contributor

Description

Increasing the default part size for S3 multipart upload from 5MB to 8MB when no part size is specified. This will reduce the number of API calls for multipart uploads.

Motivation and Context

DOTNET-8273

Testing

Ran dry run and it succeeded

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@GarrettBeatty
Copy link
Contributor

do we have any existing test cases that would use the default value that we could verify somehow the part size is 8MB? or did you somehow test manually to verify things?

partSize = S3Constants.MinPartSize;
}
// SEP Formula: Math.Max(targetPartSize, contentLength / 10_000)
long calculatedSize = Math.Max(targetPartSize, contentLength / 10_000);
Copy link
Contributor

@GarrettBeatty GarrettBeatty Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is my fault. i think in the ticket i replaced s3constants.maxnumberofparts just to be more clear but S3Constants.MaxNumberOfParts is equal to 10,000 so we should use the constant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@philasmar
Copy link
Contributor Author

do we have any existing test cases that would use the default value that we could verify somehow the part size is 8MB? or did you somehow test manually to verify things?

Added an integration test that performs a multipart upload and then checks the first part size and validates that it is 8MB.

@philasmar philasmar changed the base branch from development to feature/transfermanager October 14, 2025 15:14
@dscpinheiro dscpinheiro merged commit 5c299e8 into feature/transfermanager Oct 14, 2025
4 checks passed
@dscpinheiro dscpinheiro deleted the asmarp/update-part-size branch October 14, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants